package com.none.web.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TNewTagId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TNewTagId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1159067563358364768L;
	private Integer newsId;
	private String tagId;

	// Constructors

	/** default constructor */
	public TNewTagId() {
	}

	/** full constructor */
	public TNewTagId(Integer newsId, String tagId) {
		this.newsId = newsId;
		this.tagId = tagId;
	}

	// Property accessors

	@Column(name = "news_id", length = 11)
	public Integer getNewsId() {
		return this.newsId;
	}

	public void setNewsId(Integer newsId) {
		this.newsId = newsId;
	}

	@Column(name = "tag_id", length = 32)
	public String getTagId() {
		return this.tagId;
	}

	public void setTagId(String tagId) {
		this.tagId = tagId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TNewTagId))
			return false;
		TNewTagId castOther = (TNewTagId) other;

		return ((this.getNewsId() == castOther.getNewsId()) || (this.getNewsId() != null && castOther.getNewsId() != null && this.getNewsId().equals(
				castOther.getNewsId())))
				&& ((this.getTagId() == castOther.getTagId()) || (this.getTagId() != null && castOther.getTagId() != null && this.getTagId().equals(
						castOther.getTagId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getNewsId() == null ? 0 : this.getNewsId().hashCode());
		result = 37 * result + (getTagId() == null ? 0 : this.getTagId().hashCode());
		return result;
	}

}